package cn.ubeta.b2c.utils;

import android.widget.Toast;

import cn.ubeta.b2c.BuildConfig;
import cn.ubeta.b2c.MainApplication;

/**
 * Created by denny on 16/3/17.
 */
public class ToastHelper {

    /**
     * 弹出Toast
     * @param msg
     */
    public static void show(String msg) {
        Toast.makeText(MainApplication.getContext(), msg, Toast.LENGTH_SHORT).show();
    }

    public static void show(int msg) {
        Toast.makeText(MainApplication.getContext(), msg, Toast.LENGTH_SHORT).show();
    }

    /**
     * 调试时提示错误
     * @param msg
     */
    public static void debug(String msg) {
        if (BuildConfig.DEBUG) {
            show(msg);
        }
    }

    public static void debug(int msg) {
        if (BuildConfig.DEBUG) {
            show(msg);
        }
    }
}
